import Vue from 'vue'
import VueRouter from 'vue-router'
import TouBu from '../zuoye/TouBu.vue'
import DiBu from '../zuoye/DiBu.vue'
import TuiChu from '../zuoye/TuiChu.vue'
import CeBian from '../zuoye/CeBian.vue'
import First from '../zuoye/but/first.vue'
import Second from '../zuoye/but/second.vue'
import Third from '../zuoye/but/third.vue'
import Forth from '../zuoye/but/forth.vue'


Vue.use(VueRouter)

/* 路由规则 */
const routes = [
  
   {
    path:'/toubu',
    name:'toubu',
    component:TouBu
   },
   {
    path:'/dibu',
    name:'dibu',
    component:DiBu
   },
 {
      path:'/tuichu',
     name:'退出登录',
     component:TuiChu
  },
   {
    path:'/',
    name:'cebian',
    component:CeBian,
    redirect:'/first',
    children:[
      {
        path:'/first',
        name:'第一页',
        component:First
      },
      {
        path:'/second/:id',
        name:'第二页',
        component:Second
      },
      {
        path:'/third/:id',
        name:'第三页',
        component:Third
      },
      {
        path:'/forth',
        name:'第四页',
        component:Forth
      },
    ]
   },
   
]

const router = new VueRouter({
  mode:'hash', //配置路由模式
  routes:routes
})

export default router
